package cn.sangedon.review.common.exception;

import lombok.Builder;
import lombok.Data;

/**
 * 全局的服务异常类
 */
@Data
@Builder
public class ServiceException extends RuntimeException {
    private Integer status;

    private String msg;

    public ServiceException(int status, String msg) {
        builder().status(status).msg(msg).build();
    }

    public ServiceException(String msg) {
        builder().status(-1).msg(msg).build();
    }
}
